
        document.addEventListener('DOMContentLoaded', function () {
          const adContainer = document.getElementById('ad-box');

          if (!adContainer) {
            const adContainer = document.createElement('div');
          }

          adContainer.style.width='300px';
          adContainer.style.position='relative';
          adContainer.style.zIndex='10000';
          adContainer.style.overflow='hidden';
          const adElement = document.createElement('a');

          adElement.href = 'http://huawei.com'; 
          adElement.target = '_blank'; 
          adElement.rel = 'noopener noreferrer';

          const adImage = document.createElement('img');
          const adText = document.createElement('span');
          adText.style.position='absolute';
          adText.style.zIndex='10001';
          adText.style.right='1px';
          adText.style.bottom='1px';
          adText.style.padding='0 4px';
          adText.innerText='广告';
          adText.style.backgroundColor='#000';

          adText.style.color='#fff'
          adText.style.opacity='0.5';

          adImage.src = 'http://localhost/upload/20250902/ed9ec377cbc53761faa77792c8b93171.jpg'; 
          adImage.alt = '广告';
          adImage.style.width = '100%';
          adImage.style.height = 'auto';
          adImage.style.border = '1px solid #ccc';

          adElement.appendChild(adImage);
          adElement.appendChild(adText);
          adContainer.appendChild(adElement);

          console.log('广告已加载到页面');
        });